@import './main.less';

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-size: 14px;
  // font: 14px/1.5 'PingFang SC', 'Microsoft Yahei', 'Helvetica Neue', Helvetica, Arial,
  //   'Hiragino Sans GB', 'Heiti SC', 'WenQuanYi Micro Hei', sans-serif;
  font-family: 'Helvetica Neue', Helvetica, 'PingFang SC', 'Hiragino Sans GB',
    'Microsoft YaHei', '微软雅黑', Arial, sans-serif;
  outline: none;
}

html {
  .scrollbar;
  &::-webkit-scrollbar-thumb {
    display: block;
  }
}

.el-aside {
  .scrollbar;
  &:hover {
    &::-webkit-scrollbar-thumb {
      display: block;
    }
  }
}

.el-dialog__wrapper {
  .scrollbar;
  &:hover {
    &::-webkit-scrollbar-thumb {
      display: block;
    }
  }
}

.scrollbar {
  &::-webkit-scrollbar {
    width: 6px;
    height: 8px;
  }
  /* Track */
  &::-webkit-scrollbar-track {
    background: #fff;
    border-radius: 8px;
  }
  /* Handle */
  &::-webkit-scrollbar-thumb {
    display: none;
    background: rgb(201, 201, 202);
    border-radius: 8px;
  }
  /* Handle on hover */
  &::-webkit-scrollbar-thumb:hover {
    background: rgb(162, 162, 163);
  }
}

.size(@w,@h) {
  width: @w;
  height: @h;
}
.container-full {
  width: 100%;
  max-width: 100%;
  min-height: calc(100vh - 50px);
  margin-left: @m * 10;
  padding: @m;
  background-color: #f2f1f6;
  border-radius: 30px 30px 0 0;
  box-sizing: border-box;
  overflow-x: hidden;
}

sup {
  font-size: 0.5em;
}

a {
  color: @c-link;
  text-decoration: none;
  &:hover {
    color: @c-link-hover;
    text-decoration: underline;
  }
}

ul {
  list-style: none;
}

// 常用文字样式
.f1 {
  font-size: 16px;
  font-weight: bold;
  color: #333;
}
.f2 {
  font-size: 14px;
  font-weight: bold;
  color: #333;
}
.f3 {
  font-size: 14px;
  font-weight: normal;
  color: #333;
}
.f4 {
  font-size: 14px;
  font-weight: normal;
  color: #999;
  * {
    font-size: 14px;
  }
}
.f5 {
  font-size: 10px;
  font-weight: normal;
  color: #ff3e3e;
}

// 左右分栏布局
.f-col {
  display: flex;
  justify-content: space-between;
  & > aside,
  & > main {
    border: 1px solid @c-border;
    padding: @m / 2 @m;
    border-radius: 4px;
  }
  & > aside {
    width: 400px;
    min-width: 25%;
    margin-right: @m * 2;
    flex-shrink: 0;
  }
  & > main {
    width: 100%;
  }
  @media screen and (max-width: 800px) {
    display: block;
    aside {
      width: 100%;
      margin-bottom: @m;
    }
  }
}

// 常用box样式
.f-box,
.f-box--sub {
  border: 1px solid @c-border;
  border-radius: 4px;
  background: #fff;
  transition: 0.2s;
  overflow: hidden;
  &.f-box--error {
    border-color: @c-err;
  }
}
.f-box {
  padding: @m;
  border: 1px solid @c-border;
  border-radius: 6px;
  &:hover {
    box-shadow: 0px 0px 10px rgba(0, 80, 180, 0.2);
    // box-shadow: 0px 0px 20px rgba(0, 80, 180, 0.2);
  }
  .f-box__inner {
    border-bottom: 1px solid @c-border;
    padding: @m / 2 0;
    &:first-child {
      padding-top: 0;
    }
    &:last-child {
      padding-bottom: 0;
      border-bottom: none;
    }
  }
}
.f-box--sub {
  padding: @m / 2 @m;
}

// 工具样式
.f-m {
  margin: @m;
}
.f-mt {
  margin-top: @m;
}
.f-mb {
  margin-bottom: @m;
}
.f-ml {
  margin-left: @m;
}
.f-mr {
  margin-right: @m;
}
.f-mt2 {
  margin-top: @m * 2;
}
.f-mb2 {
  margin-bottom: @m * 2;
}
.f-p {
  padding: @m;
}
.f-pt {
  padding-top: @m;
}
.f-pb {
  padding-bottom: @m;
}
.f-pl {
  padding-left: @m;
}
.f-pr {
  padding-right: @m;
}
// 左空格fix
.f-fixl {
  margin-left: 5px;
}
// 右空格fix
.f-fixr {
  margin-right: 5px;
}

// icon btn
.f-i-btn {
  color: #ccc;
  cursor: pointer;
  transition: 0.2s;
  display: inline-block;
  & + .f-i-btn {
    margin-left: 5px;
  }
  i {
    font-size: 18px;
  }
  &:hover {
    color: #aaa;
  }
}

// message box style
.f-messagebox {
  vertical-align: top;
  margin-top: 15vh;
  border: none;
  .el-message-box__header {
    background: @c;
    padding: 15px;
  }
  .el-message-box__title {
    color: #fff;
    span {
      font-size: 14px;
    }
  }
  .el-message-box__headerbtn {
    top: 13px;
    .el-message-box__close {
      color: #fff;
      opacity: 0.6;
      transition: 0.2s;
    }
    &:hover {
      .el-message-box__close {
        color: #fff;
        opacity: 1;
      }
    }
  }
  .el-message-box__content {
    padding: 10px 20px;
    max-height: 400px;
    overflow-y: auto;
  }
  .el-message-box__message {
    margin-top: 15px;
  }
  .el-input {
    input {
      height: 36px;
    }
  }
  .el-message-box__btns {
    .el-button {
      width: 80px;
      height: 32px;
      span {
        font-size: 12px;
      }
    }
  }
}

//两栏布局 aside滚动筛选框
.f-aside-list {
  margin: 15px 0;
  line-height: 32px;
  text-align: left;
  max-height: 600px;
  overflow-y: auto;
  padding-bottom: 15px;
  .list-li {
    padding-left: 3px;
    cursor: pointer;
    &:hover {
      color: @c;
    }
  }
  .list-li__select {
    color: @c;
    pointer-events: none;
  }
  .list-li__none {
    text-align: center;
    color: @c-label-light;
  }
}

//增加&删除icon
.f-add-more {
  margin-bottom: 15px;
  .common {
    font-size: 22px;
    vertical-align: -2px;
    margin-left: 4px;
    &:active {
      transform: scale(0.8);
    }
  }
  .el-icon-remove {
    color: @c-err;
    .common;
  }
  .el-icon-circle-plus {
    .common;
  }
}

.f-text-nowrap {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.f-page {
  .fp-col {
    display: flex;
    justify-content: space-between;
    .fp-col__left {
      max-width: 400px;
      min-width: 320px;
      width: 25%;
      flex-shrink: 0;
      margin-right: @m * 1.5;
    }
    .fp-col__right {
      width: 100%;
    }
    @media screen and (max-width: 800px) {
      display: block;
      .fp-col__left {
        margin: 0 0 @m * 1.5 0;
        width: 100%;
        min-width: 0;
        max-width: 100%;
      }
    }
  }
}

.el-table__body-wrapper {
  .scrollbar;
  &::-webkit-scrollbar-thumb {
    display: block;
  }
}

.card-form {
  margin-top: 30px;
}

.card-bottom {
  padding: 30px 0 15px 0;
  text-align: center;
}

.right-btn {
  margin-right: @m / 2;
}

.inline-item {
  width: 45%;
  min-width: 400px;
}

.block-item {
  display: block;
  width: 100%;
}

.input-label {
  color: @c-label;
  padding: 5px;
  font-size: 14px;
  &:not(:first-child) {
    margin-left: @m;
  }
}

.list-header-item {
  display: inline-block;
}

.jsoneditor-tree {
  min-height: 200px;
  max-height: 500px !important;
  .scrollbar;
  &:hover {
    &::-webkit-scrollbar-thumb {
      display: block;
    }
  }
}

.box-detail {
  color: @c-label;
  .bd-hd {
    display: flex;
    background: #f6f8f9;
    color: #9a9a9a;
    font-weight: 300;
    height: 50px;
    line-height: 50px;
    padding: 0 10px;
    .noraml {
      flex: 1;
    }
    .large {
      flex: 3;
    }
    .small {
      flex: 0.5;
      min-width: 50px;
    }
    & > div {
      padding-right: 10px;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }
  }
  .bd-fee__head,
  .bd-fee__list {
    display: flex;
    width: 100%;
    padding: 0 10px;
    .noraml {
      flex: 1;
    }
    .large {
      flex: 3;
    }
    .small {
      flex: 0.5;
      min-width: 50px;
    }
    & > div {
      flex: 1;
      padding-right: 10px;
    }
  }
  .bd-fee__head {
    min-height: 50px;
    line-height: 50px;
    & > div {
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }
    .operations {
      width: 50px;
    }
  }
  .small-text {
    line-height: 40px;
    height: 40px;
    min-height: 40px;
    & > * {
      font-size: 13px;
    }
  }
  .bd-fee__list {
    background: #fff;
    height: auto;
    & > div {
      font-weight: 300;
      color: #666;
    }
    .bd-fee__list_hd {
      display: flex;
      background: #f6f8f9;
      color: #9a9a9a;
      font-weight: 300;
      height: 50px;
      width: 100%;
      line-height: 50px;
      margin-left: 50px;
      & > div {
        flex: 1;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        font-size: 13px;
      }
      &:last-child {
        .bd-fee__list {
          border-bottom: none;
        }
      }
    }
    .flex8 {
      flex: 0.8;
    }
    .flex15 {
      flex: 1.5;
    }
  }
  .bd-fee__list--special {
    background-color: #f6f8f9;
    padding: 0;
  }
}
